Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

ADD(s(X), Y) → S(n__add(activate(X), activate(Y)))
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
ACTIVATE(n__s(X)) → S(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
IF(true, X, Y) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
AND(true, X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ADD(s(X), Y) → S(n__add(activate(X), activate(Y)))
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
ACTIVATE(n__s(X)) → S(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
IF(true, X, Y) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
AND(true, X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 5 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__add(X1, X2)) → ADD(activate(X1), X2) at position [0] we obtained the following new rules:

ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__add(n__from(x0), y1)) → ADD(from(x0), y1)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
QDP
              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__from(x0), y1)) → ADD(from(x0), y1)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
ACTIVATE(n__from(X)) → FROM(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2)) at position [0] we obtained the following new rules:

ACTIVATE(n__first(n__add(x0, x1), y1)) → FIRST(add(activate(x0), x1), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
QDP
                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__add(n__from(x0), y1)) → ADD(from(x0), y1)
ACTIVATE(n__first(n__add(x0, x1), y1)) → FIRST(add(activate(x0), x1), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__add(n__from(x0), y1)) → ADD(from(x0), y1) at position [0] we obtained the following new rules:

ACTIVATE(n__add(n__from(x0), y1)) → ADD(n__from(x0), y1)
ACTIVATE(n__add(n__from(x0), y1)) → ADD(cons(activate(x0), n__from(n__s(activate(x0)))), y1)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__from(x0), y1)) → ADD(n__from(x0), y1)
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(x0, x1), y1)) → FIRST(add(activate(x0), x1), activate(y1))
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__add(n__from(x0), y1)) → ADD(cons(activate(x0), n__from(n__s(activate(x0)))), y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
QDP
                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__first(n__add(x0, x1), y1)) → FIRST(add(activate(x0), x1), activate(y1))
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__add(x0, x1), y1)) → FIRST(add(activate(x0), x1), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
QDP
                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
QDP
                                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(x0), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
QDP
                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(x0), activate(y1)) at position [0] we obtained the following new rules:

ACTIVATE(n__first(n__from(x0), y1)) → FIRST(cons(activate(x0), n__from(n__s(activate(x0)))), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(n__from(x0), activate(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
QDP
                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(cons(activate(x0), n__from(n__s(activate(x0)))), activate(y1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(n__from(x0), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
QDP
                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
QDP
                                                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), s(x0)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), n__s(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
QDP
                                                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__s(x0))) → FIRST(add(activate(y0), y1), n__s(x0))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
QDP
                                                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0))
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(x0)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, n__s(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
QDP
                                                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, n__s(x0))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
QDP
                                                                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), s(x0)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), n__s(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
QDP
                                                                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(y0), n__s(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
QDP
                                                                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(x0)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), n__s(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
QDP
                                                                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ADD(0, X) → ACTIVATE(X)
ADD(s(X), Y) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), n__s(x0))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(x0))
ACTIVATE(n__add(n__add(x0, x1), y1)) → ADD(add(activate(x0), x1), y1)
ACTIVATE(n__first(n__add(y0, y1), x0)) → FIRST(add(activate(y0), y1), x0)
ACTIVATE(n__add(n__s(x0), y1)) → ADD(s(x0), y1)
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(y0), x0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(x0))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
ACTIVATE(n__add(n__first(x0, x1), y1)) → ADD(first(activate(x0), activate(x1)), y1)
ACTIVATE(n__add(X1, X2)) → ACTIVATE(X1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Y)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(y0), from(x0))
ACTIVATE(n__from(X)) → FROM(X)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ADD(s(X), Y) → ACTIVATE(X)
ADD(0, X) → ACTIVATE(X)
ACTIVATE(n__first(n__first(y0, y1), n__add(x0, x1))) → FIRST(first(activate(y0), activate(y1)), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__add(x0, x1))) → FIRST(y0, add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__add(x0, x1))) → FIRST(s(y0), add(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
FROM(X) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__add(y0, y1), n__from(x0))) → FIRST(add(activate(y0), y1), from(x0))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ADD(s(X), Y) → ACTIVATE(Y)
ACTIVATE(n__add(x0, y1)) → ADD(x0, y1)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__add(y0, y1), n__add(x0, x1))) → FIRST(add(activate(y0), y1), add(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(y0), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__add(y0, y1), n__first(x0, x1))) → FIRST(add(activate(y0), y1), first(activate(x0), activate(x1)))

The TRS R consists of the following rules:

and(true, X) → activate(X)
and(false, Y) → false
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
add(0, X) → activate(X)
add(s(X), Y) → s(n__add(activate(X), activate(Y)))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(activate(Y), n__first(activate(X), activate(Z)))
from(X) → cons(activate(X), n__from(n__s(activate(X))))
add(X1, X2) → n__add(X1, X2)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
activate(n__add(X1, X2)) → add(activate(X1), X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(X)
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.